﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin/Main.master"
    ValidateRequest="false" Title="添加图片" CodeFile="CodeAdd.aspx.cs" Inherits="Admin_CodeAdd" %>

<%@ Register TagPrefix="uc" TagName="ContentMenu" Src="~/Admin/ContentMenu.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="LeftMenu" runat="Server">
    <uc:ContentMenu ID="ContentMenu" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MidContent" runat="Server">
    <div id="mainMenu">
        <ul>
            <li>
                <asp:HyperLink ID="ArticleLink" runat="server">添加图片</asp:HyperLink>
            </li>
            <li><a href="CodeList.aspx">图片列表</a></li><li><a href="CodeEdit.aspx">编辑图片</a></li></ul>
    </div>
    <div id="main">
        <asp:Label ID="Msg" runat="server" Text="" CssClass="msg" Visible="False"></asp:Label>
        <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D7D7D7">
            <tr>
                <td colspan="2" bgcolor="#FFFFFF" class="mainTitle">
                    "<asp:Label ID="MenuName" runat="server" ForeColor="Black"></asp:Label>" 添加图片&nbsp;
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF" class="mainContentLeftTd">
                    所属分类:
                </td>
                <td bgcolor="#FFFFFF" class="mainContentRightTd">
                    <asp:DropDownList ID="ArticleClassIdList" runat="server">
                        <asp:ListItem Selected="True" Value="1">单图</asp:ListItem>
                        <asp:ListItem Value="2">换灯片</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    标题:
                </td>
                <td bgcolor="#FFFFFF">
                    <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTitle"
                        Display="Dynamic" ErrorMessage="文章标题必须填写"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    图片地址:
                </td>
                <td bgcolor="#FFFFFF">
                    &nbsp;<asp:FileUpload ID="PicSmall" runat="server" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="PicSmall"
                        Display="Dynamic" ErrorMessage="图片路径必须选择"></asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="PicSmallCustomValidator" runat="server" ControlToValidate="PicSmall"
                        Display="Dynamic" ErrorMessage="图片文件格式错误" OnServerValidate="PicSmallCustomValidator_ServerValidate"></asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    连接地址:
                </td>
                <td bgcolor="#FFFFFF">
                    <asp:TextBox ID="txturl" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txturl"
                        Display="Dynamic" ErrorMessage="文章编辑必须填写"></asp:RequiredFieldValidator>&nbsp;
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    &nbsp;
                </td>
                <td bgcolor="#FFFFFF">
                    宽度：
                    <asp:TextBox ID="txtwidth" runat="server" Columns="10"></asp:TextBox>px &nbsp; 高度:<asp:TextBox
                        ID="txtheight" runat="server" Columns="10"></asp:TextBox>px
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    添加时间:
                </td>
                <td bgcolor="#FFFFFF">
                    <asp:TextBox ID="AddTime" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="AddTime"
                        Display="Dynamic" ErrorMessage="添加时间必须填写"></asp:RequiredFieldValidator>&nbsp;
                    <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="AddTime"
                        Display="Dynamic" ErrorMessage="时间格式错误！" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                    权重:
                </td>
                <td bgcolor="#FFFFFF">
                    &nbsp;<asp:TextBox runat="server" ID="txtorder" Text="999" Width="50px" ondrop="return regInput(this,	/^[0-9]*$/,		event.dataTransfer.getData('Text'))"
                        onKeyPress="return regInput(this,	/^[0-9]*$/,		String.fromCharCode(event.keyCode))"
                        onpaste="return regInput(this,	/^[0-9]*$/,		window.clipboardData.getData('Text'))"></asp:TextBox>&nbsp;
                </td>
            </tr>
            <tr>
                <td align="right" bgcolor="#FFFFFF">
                </td>
                <td bgcolor="#FFFFFF">
                    &nbsp;<asp:Button ID="Add" runat="server" Text="添加图片" CssClass="inputBt" OnClick="Add_Click" />
                </td>
            </tr>
        </table>
    </div>

    <script language="JavaScript" type="text/javascript">
        topMenuThisPage(2);//当前位置顶部菜单标识
        contentSubMenuThisPage();//当前位置左侧菜单标识
        mainMenuThisPage(1);//当前选项卡标识
    </script>

</asp:Content>
